﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ProjectVLIB_LAB01
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void btnSupport_Click(object sender, EventArgs e)
        {
            frmSupport formNew = new frmSupport();
            formNew.FormClosed += new FormClosedEventHandler(formNew_FormClosed);
            formNew.Show();
            this.Hide();
        }
        //Event
        private void formNew_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Show();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void hỗTrợQuaEmailToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSupport formNew = new frmSupport();
            formNew.FormClosed += new FormClosedEventHandler(formNew_FormClosed);
            formNew.Show();
            this.Hide();
        }

        private void đổimậtKhẩuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmChangePassword formNew = new frmChangePassword();
            formNew.ShowDialog();
        }

        private void đăngxuấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "Người dùng : admin";
            toolStripStatusLabel2.Text = "Ngày : "+DateTime.Now.ToShortDateString();
        }
    }
}
